package com.demo.oauth2jFinalShiroServer.model;

import java.util.HashMap;
import java.util.concurrent.atomic.AtomicInteger;

public class Note {
	public static AtomicInteger ids = new AtomicInteger(0);
	public static final HashMap<Integer, Note> noteMap = new HashMap<>();
	public static Note addNote(String title, String content){
		Note note = new Note(ids.incrementAndGet(), title, content);
		noteMap.put(note.getId(), note);
		return note;
	}
	
	public Note() {
		super();
	}

	private Note(Integer id, String title, String content) {
		super();
		this.id = id;
		this.title = title;
		this.content = content;
	}

	private Integer id;
	private String title;
	private String content;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}
